/*!
 * BEGIN HEADER
 *
 * Contains:        Bordeaux Theme LESS
 * CVM-Role:        Theme
 * Maintainer:      Hendrik Erz
 *                  Originally by Arthur Perret (https://arthurperret.fr/)
 * License:         GNU GPL v3
 *
 * Description:     A calm theme based on the Karl Marx Stadt-theme with
 *                  modifications according to Tufte's typography. This theme
 *                  is based upon the Custom CSS by Arthur Perret.
 *
 * END HEADER
 */

@import "../theme-karl-marx-stadt/theme-main.less";

// Primary colours
@c-primary: #657b83;
@c-primary-shade: #839496;
@c-secondary: #002b36;
@c-secondary-shade: #073642;

// Also make them accessible to the root
:root {
  --c-primary: @c-primary;
  --c-primary-shade: @c-primary-shade;
  --c-secondary: @c-secondary;
  --c-secondary-shade: @c-secondary-shade;
}

body {
  // LIGHT THEME
  .cm-fenced-code.cm-comment { font-style: normal; }
  .cm-string { font-family: inherit; }

  #file-manager #file-manager-resize { background-color: #fffff8; }

  // GENERAL EDITOR STYLES
  #editor {
    background-color: #fffff8;

    .CodeMirror,
    .modal .dialog .code,
    .CodeMirror .cm-comment,
    .CodeMirror .cm-fenced-code,
    .CodeMirror .cm-formatting-task,
    .CodeMirror .cm-formatting-code-block,
    .CodeMirror .cm-formatting-list-ol,
    .CodeMirror .cm-formatting-list-ul,
    .popup .search input.regexp {
      font-family: @font-inconsolata;
    }

    .CodeMirror {
      // EDITOR SPECIFIC
      // Formattings
      .cm-hr, .cm-em, .cm-strong,
      .cm-formatting-list-ul, .cm-formatting-list-ol { color: inherit; }

      .cm-quote,
      .cm-quote.cm-em,
      .cm-quote.cm-strong { color: #555; }

      .cm-fenced-code.cm-link,
      .cm-fenced-code.cm-comment,
      .cm-string { color: #999999; }

      .cm-fenced-code.cm-atom,
      .cm-formatting-header-1,
      .cm-formatting-header-2,
      .cm-formatting-header-3,
      .cm-formatting-header-4,
      .cm-formatting-header-5,
      .cm-formatting-header-6,
      .citeproc-citation {
        background-color: inherit; // Should be fine with the other styles
        color: #d02325;
      }

      .cm-link, .cma { color: inherit; }

      .cm-table {
        font-family: @font-inconsolata;
        font-weight: 400;
      }
    }
  }

  &.dark {
    // DARK THEME
    #editor {
      background-color: #002b36;
      // Style the code block line wrapper classes
      .CodeMirror .code-block-line { background-color: #111111; }
    }

    #file-manager #file-manager-resize { background-color: #002b36; }

    #editor .CodeMirror,
    #file-list div.container div.list-item p.filename { color: #839496; }

    #file-list {
      background-color: #073642;

      div.list-item { border-bottom: 1px solid #586e75; }
    }

    .cm-quote, .cm-link, .cm-strong, .cm-em { color: #93a1a1; }

    .citeproc-citation { color: #dc322f; }
  }
}
